/*
 * @(#) StringConvert .java  1.0  2004-4-12
 *
 * Copyright 2003 by LongTop Corporation.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * LongTop Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with LongTop.
 */
package com.cnc.bas.util;

import org.apache.commons.beanutils.Converter;
import org.apache.commons.beanutils.converters.StringConverter;

/**
 * User: Du bf
 * Date: 2004-11-22
 */
public class StringConvert implements Converter {

    public StringConvert() {
    }

    public Object convert(Class type, Object value) {
        if (value == null) return null;
        if (value instanceof String) value = value.toString().trim();
        return (new StringConverter()).convert(type, value);
    }
}
